{% extends 'base.html' %}
{% load static %}
{% block title %}Home - {{ block.super }}{% endblock %}
{% block top %}
<div class="top-container indigo darken-1">
  <div class="container">
    <div class="section indigo-text text-lighten-5">
      <h3>O Brasil em dados libertos</h3>
      <p class="flow-text">Repositório de dados públicos disponibilizados em formato acessível</p>
    </div>
  </div>
</div>
{% endblock %}

{% block content %}

<section>
  <div class="row">
    <div class="col m12 l6">
        <h1 class="header center green-text">Últimas atualizações</h1>
        <div class="m-t-50">
          {% for activity in recent_activities %}
            <ul class="collection">
              <li class="collection-item"> <strong>{{ activity.created_at|date:" d/m/Y" }}</strong> - {{ activity.title }}{% if activity.url %} - <a href="{{ activity.url }}">veja mais</a>{% endif %}</li>
            </ul>
          {% endfor %}
        </div>
    </div>
    <div class="col m12 l6">
      <h1 class="header center green-text">ESPECIAL COVID-19: DADOS POR MUNICÍPIO</h1>
      <div style="text-align: justify;" class="row center">
        <p class="col s12 light">{% include 'covid19/text.html' %}</p>
      </div>
      <div class="row center">
        <a href="{% url 'covid19:dashboard' %}" id="download-button"
          class="btn-large waves-effect waves-light blue">Ver Mais</a>
      </div>
    </div>
  </div>
</section>

<section>
  <div class="row center">
    <div class="col s12 m6 xl3">
      <a href="{% url 'core:manifesto' %}">
        <div class="card small green hoverable waves-block  waves-effect waves-light">
          <div class="card-content center card-home">
            <span class="card-title bold white-text">Manifesto</span>
          </div>
          <div class="card-content card-body white-text" style="text-align:justify;">
            <p>Venha entender o que motivou a criação do <strong>Brasil.IO</strong> e quais
              são os objetivos do projeto!</p>
          </div>
        </div>
      </a>
    </div>
    <div class="col s12 m6 xl3">
      <a href="{% url 'core:dataset-list' %}">
        <div class="card small yellow hoverable waves-block  waves-effect waves-orange">
          <div class="card-content center card-home">
            <span class="card-title bold black-text">Datasets</span>
          </div>
          <div class="card-content card-body black-text" style="text-align:justify;">
            <p>Confira a lista completa de todas as base de dados liberadas.</p>
          </div>
        </div>
      </a>
    </div>
    <div class="col s12 m6 xl3">
      <a href="{% url 'core:dataset-suggestion' %}">
        <div class="card small blue darken-1 hoverable waves-block  waves-effect waves-light">
          <div class="card-content center card-home">
            <span class="card-title bold white-text">Sugira um Dataset</span>
          </div>
          <div class="card-content card-body white-text" style="text-align:justify;">
            <p>Conhece algum dataset bacana que gostaria de ver aqui? Sugira para nós! =)</p>
          </div>
        </div>
      </a>
    </div>
    <div class="col s12 m6 xl3">
      <a href="https://github.com/turicas/brasil.io/issues">
        <div class="card small hoverable waves-block  waves-effect">
          <div class="card-content center card-home">
            <span class="card-title bold black-text">Colabore</span>
          </div>
          <div class="card-content card-body" style="text-align:justify;">
            <p class="black-text">Achou o projeto legal e quer contribuir? Clique aqui e veja aqui como.
            </p>
          </div>
        </div>
      </a>
    </div>
  </div>
</section>

<section id="datasets">
  <h4 class="header center green-text m-t-50 m-b-50">Datasets</h4>
  <div class="row" class="m-t-50">
    {% for dataset in datasets %}
    {% include 'core/dataset-card.html' %}
    {% endfor %}
  </div>

  <div class="row text-center" style="padding-bottom: 30px;">
    <a class="btn waves-effect waves-light m-t-20" href="{% url 'core:dataset-list' %}" role="button">
      Ver Todos Datasets
    </a>
  </div>
</section>

{% endblock %}
